

<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label">供应商名称</label>
            <div class="layui-input-block">
                <input name="supplier" value='{$vo.supplier|default=""}'  placeholder="请输入供应商名称" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">付款说明</label>
            <div class="layui-input-block">
                <input name="note" value='{$vo.note|default=""}'  placeholder="请输入付款说明" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">付款日期</label>
            <div class="layui-input-block">
                <input name="start_at" value='{$vo.start_at|default=""}'  placeholder="请输入付款日期" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">总金额</label>
            <div class="layui-input-block">
                <input name="total" value='{$vo.total|default=""}'  placeholder="请输入总金额" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">Openid</label>
            <div class="layui-input-block">
                <input disabled name="openid" value='{$vo.openid|default=""}' class="layui-input">
            </div>
        </div>

    </div>

    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <input type="hidden" name="id" value="{$id}" />
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>

{block name='script'}
<script>
    require(['jquery.autocompleter'], function () {
        layui.form.render();
    });


    form.on('checkbox(filter)', function(data){
        console.log(data.elem.checked); //得到checkbox原始DOM对象

    });

    form.on('layui-input-block', function(data){
        console.log(data.elem); //得到radio原始DOM对象
        console.log(data.value); //被点击的radio的value值
        console.log(data.elem.checked);
    });
</script>
{/block}
